@Inject('$http')
class MsgService {

  query(param) {
    return this.$http.post('/api/v1/message/query', param);
  }

  setRead(id) {
    return this.$http({
      url: '/api/v1/message/setReaded',
      method: 'GET',
      params: id,
    });
  }

  isSetAllRead(id) {
    return this.$http({
      url: '/api/v1/message/setAllReaded',
      method: 'GET',
    });
  }

  deleteAll() {
    return this.$http({
      url: '/api/v1/message/deleteAllReaded',
      method: 'GET',
    });
  }

  delete(param) {
    return this.$http.post('/api/v1/message/delete', param);
  }

}

export default MsgService;
